package com.tencent;

import com.tencent.utils.Result;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class StoreServiceFallbackFactory implements FallbackFactory<StoreService> {

    @Override
    public StoreService create(Throwable throwable) {
        return new StoreService() {

            @Override
            public Result add(Store store) {
                return new Result(false, "熔断了");
            }
        };
    }
}
